home *** CD-ROM | disk | FTP | other *** search
- /*
- File: AVTransportController.h
-
- Contains: Definitions for AVTransportController application.
-
- Written by: Guillermo Gallegos
-
- Copyright: © 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <2*> 11/6/96 GG Add Menu Items for snapshot.
- <FW2> 9/16/96 GG Filled in contains field.
- <FW1> 9/16/96 GG first checked in.
-
- */
-
-
-
- #ifndef __AVTRANSPORTCONTROLLER__
- #define __AVTRANSPORTCONTROLLER__
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- enum
- {
- kDumpBufferSize = 1000000
- };
-
- // These are for positioning the Disk Initialization dialogs.
-
- #define kDITop 0x0050
- #define kDILeft 0x0070
-
- // kExtremeNeg and kExtremePos are used to set up wide open rectangles and
- // regions.
-
- #define kExtremeNeg (-32768)
- #define kExtremePos (32767 - 1) // Required to address an old region bug
-
- enum
- {
- kInvalidWindowRef = 0
- };
-
- enum
- {
- kMenuBarResourceID = 128,
-
- kControllerWindowResourceID = 128,
-
- kStopRectResourceID = 128,
- kGoRectResourceID = 129,
-
- kAboutAlertResourceID = 128
- };
-
- enum
- {
- kAppleMenuID = 128,
- kAboutAppleMenuItem = 1,
-
- kFileMenuID = 129,
- kNewFileMenuItem = 1,
- kCloseFileMenuItem = 4,
- kQuitFileMenuItem = 12,
-
- kEditMenuID = 130,
- kUndoEditMenuItem = 1,
- kCutEditMenuItem = 3,
- kCopyEditMenuItem = 4,
- kPasteEditMenuItem = 5,
- kClearEditMenuItem = 6,
-
- kExtraMenuID = 131,
- kPlayMenuItem = 1,
- kStopMenuItem = 2,
- kRecordMenuItem = 3,
- kRewindMenuItem = 4,
- kFastForwardMenuItem = 5,
- kPauseMenuItem = 6,
- kSlowMenuItem = 7,
- kNextFrameMenuItem = 8,
- kPreviousFrameMenuItem = 9,
-
- kSnapShotMenuID = 132,
- kCaptureSnapShotMenuItem = 1,
- kPlaySnapShotMenuItem = 2,
- kStopSnapShotMenuItem = 3
- };
-
- struct AVTControllerAppDataStruct
- {
- QDGlobals qdGlobals; // Quickdraw globals for our application.
-
- struct ControllerDataStruct
- *ControllerDataList; // List of traffic lights.
-
- Rect stopRect, // Rects for lights.
- goRect;
-
- AEEventHandlerUPP openApplicationEventHandler; // Handler for open application events.
- Boolean openApplicationEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP openDocumentsEventHandler; // Handler for open documents events.
- Boolean openDocumentsEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP printDocumentsEventHandler; // Handler for print documents events.
- Boolean printDocumentsEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP quitApplicationEventHandler; // Handler for quit application events.
- Boolean quitApplicationEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP deviceAddedEventHandler; // Handler for device added events.
- Boolean deviceAddedEventHandlerInstalled; // True if handler was successfully installed.
-
- AEEventHandlerUPP deviceRemovedEventHandler; // Handler for device removed events.
- Boolean deviceRemovedEventHandlerInstalled; // True if handler was successfully installed.
-
- AVTClientID avtClientID; // Our client ID for the AV transport control driver family.
-
- Ptr dumpBuffer; // Buffer for dumping video.
- UInt32 dumpBufferSize; // Size allocated for above buffer.
- Boolean gotSnapShot; // True if we've gotten a snap shot.
-
- Boolean inForeground; // True if app is in foreground.
- Boolean quit; // Flag to tell event loop to quit.
- };
- typedef struct AVTControllerAppDataStruct
- AVTControllerAppData,
- *AVTControllerAppDataPtr;
-
- struct ControllerDataStruct
- {
- struct ControllerDataStruct
- *pNextControllerData; // Link to next data record.
- WindowRef ControllerWindowRef; // Window reference for this traffic light.
- AVTDriverID avtDriverID; // Reference to driver we control.
- Boolean snapShotPlaying; // True if snap shot is playing.
- Boolean stopped; // State of traffic light.
- };
- typedef struct ControllerDataStruct
- ControllerData,
- *ControllerDataPtr;
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __AVTRANSPORTController__ */
-